# 导包
import unittest
import app
from script.test01_home import TestHomeAPI
from script.test02_goods import TestGoodsAPI
from script.test03_order import TestOrderAPI
from htmltestreport import HTMLTestReport


# 封装测试套件
suite = unittest.TestSuite()
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestHomeAPI))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestGoodsAPI))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestOrderAPI))

# 指定报告保存位置
report = app.BASE_PATH + "/report/report.html"

# 创建runner
runner = HTMLTestReport(report, title="Ego小程序")

# 执行suite
runner.run(suite)
